package cn.tedu.mybatis.mapper;

import cn.tedu.mybatis.Admin;
import cn.tedu.mybatis.AdminDetailsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {

    int insert(Admin admin);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int updatePasswordById(
            @Param("id") Long id,
            @Param("password") String password);

    int count();

    Admin getById(Long id);

    Admin getByUsername(String username);

    AdminDetailsVo getDetailsById(Long id);

    List<Admin> list();

    List<Admin> listPage(@Param("offset") Integer offset,@Param("size") Integer size);

}
